package com.java.day08;

import com.java.day06.Fish;

import java.util.Arrays;

public class Demo01 {
    public static void main(String[] args) {
        Fish[] fish = new Fish[3];
        Fish fish1 = new Fish("罗罗", 3, "男", "罗非鱼", "red");
        Fish fish2 = new Fish("罗罗罗", 1, "男", "罗非鱼", "red");
        Fish fish3 = new Fish("罗罗落落", 3, "男", "罗非鱼", "red");

        fish[0] = fish1;
        fish[1] = fish2;
        fish[2] = fish3;

        Arrays.sort(fish);

        for (int i = 0; i < fish.length; i++) {
            System.out.println(fish[i]);
        }


    }
}
